Balance
Queries the the balance information for a token on the spcified chain.
query Vcoin($balanceKey: BalanceKeyInput) {
vcoin {
balance(balance_key: $balanceKey) {
amount
}
}
}
Example
curl --request POST \
--header 'content-type: application/json' \
--url 'https://testnet.api.euclidprotocol.com/graphql' \
--data '{"query":"query Vcoin($balanceKey: BalanceKeyInput) {\n vcoin {\n balance(balance_key: $balanceKey) {\n amount\n }\n }\n}","variables":{"balanceKey":{"cross_chain_user":{"address":"nibi1...","chain_uid":"nibiru"},"token_id":"nibi"}}}'
Arguments
- balanceKey (BalanceKeyInput): The input key for the balance query. It includes the address of the user, the chain UID and the token Id for which we want to get the balance for.
Return Fields
Field | Type | Description |
---|---|---|
amount | String | The amount of tokens in the balance for the specified user. |